package com.qianfeng.libra.cowshop.app.models;

import org.json.JSONException;
import org.json.JSONObject;

import java.io.Serializable;

/**
 * Created by Libra丶ZW on 2015/3/26 0026.
 */
public class TopicProduct implements Serializable {
    private String ProductSN;
    private String QHMProductSN;
    private String QHMSaleProductSN;
    private String Title;
    private String ImageSN;
    private int Price;
    private int EbbPrice;
    private int ShortPrice;
    private String Stock;
    private String SaleTime;
    private String StopSaleTime;
    private String Sort;
    private String IsTop;
    private String WebSiteLogo;
    private String LimitSaleNum;

    public void parseJSON(JSONObject jsonObject) {
        if (jsonObject != null) {
            try {
                ProductSN = jsonObject.getString("ProductSN");
                QHMProductSN = jsonObject.getString("QHMProductSN");
                QHMSaleProductSN = jsonObject.getString("QHMSaleProductSN");
                Title = jsonObject.getString("Title");
                ImageSN = jsonObject.getString("ImageSN");
                Stock = jsonObject.getString("Stock");
                if (jsonObject.has("SaleTime")) {
                    SaleTime = jsonObject.getString("SaleTime");
                }
                if (jsonObject.has("StopSaleTime")) {
                    StopSaleTime = jsonObject.getString("StopSaleTime");
                }
                Sort = jsonObject.getString("Sort");
                IsTop = jsonObject.getString("IsTop");
                WebSiteLogo = jsonObject.getString("WebSiteLogo");
                LimitSaleNum = jsonObject.getString("LimitSaleNum");

                Price = jsonObject.getInt("Price");
                EbbPrice = jsonObject.getInt("EbbPrice");
                ShortPrice = jsonObject.getInt("ShortPrice");

            } catch (JSONException e) {
                e.printStackTrace();
            }
        }
    }

    public int getEbbPrice() {
        return EbbPrice;
    }

    public void setEbbPrice(int ebbPrice) {
        EbbPrice = ebbPrice;
    }

    public String getImageSN() {
        return ImageSN;
    }

    public void setImageSN(String imageSN) {
        ImageSN = imageSN;
    }

    public String getIsTop() {
        return IsTop;
    }

    public void setIsTop(String isTop) {
        IsTop = isTop;
    }

    public String getLimitSaleNum() {
        return LimitSaleNum;
    }

    public void setLimitSaleNum(String limitSaleNum) {
        LimitSaleNum = limitSaleNum;
    }

    public int getPrice() {
        return Price;
    }

    public void setPrice(int price) {
        Price = price;
    }

    public String getProductSN() {
        return ProductSN;
    }

    public void setProductSN(String productSN) {
        ProductSN = productSN;
    }

    public String getQHMProductSN() {
        return QHMProductSN;
    }

    public void setQHMProductSN(String QHMProductSN) {
        this.QHMProductSN = QHMProductSN;
    }

    public String getQHMSaleProductSN() {
        return QHMSaleProductSN;
    }

    public void setQHMSaleProductSN(String QHMSaleProductSN) {
        this.QHMSaleProductSN = QHMSaleProductSN;
    }

    public String getSaleTime() {
        return SaleTime;
    }

    public void setSaleTime(String saleTime) {
        SaleTime = saleTime;
    }

    public int getShortPrice() {
        return ShortPrice;
    }

    public void setShortPrice(int shortPrice) {
        ShortPrice = shortPrice;
    }

    public String getSort() {
        return Sort;
    }

    public void setSort(String sort) {
        Sort = sort;
    }

    public String getStock() {
        return Stock;
    }

    public void setStock(String stock) {
        Stock = stock;
    }

    public String getStopSaleTime() {
        return StopSaleTime;
    }

    public void setStopSaleTime(String stopSaleTime) {
        StopSaleTime = stopSaleTime;
    }

    public String getTitle() {
        return Title;
    }

    public void setTitle(String title) {
        Title = title;
    }

    public String getWebSiteLogo() {
        return WebSiteLogo;
    }

    public void setWebSiteLogo(String webSiteLogo) {
        WebSiteLogo = webSiteLogo;
    }
}
